﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using DOM;
using MOD;

namespace BIZ
{
    /// <summary>
    /// ManagerModifyCourseBIZ 的摘要说明。
    /// </summary>
    public class ManagerModifyCourseBIZ
    {
        public ManagerModifyCourseBIZ()
        {
            //
            // TODO: 在此处添加构造函数逻辑
            //
        }
        public DataTable ShowAllCourse()
        {
            DataTable dt = new DataTable();
            CourseDOM course = new CourseDOM();
            dt = course.SelectAll();


            return dt;

        }
        public DataTable QueryByCourseID(string courseID)
        {
            DataTable dt = new DataTable();
            CourseDOM course = new CourseDOM();
            dt = course.SelectById(courseID);
           return dt; 
            
        }
        public DataTable QueryByCourseName(string courseName)
        {
            DataTable dt = new DataTable();
            CourseDOM course = new CourseDOM();
            dt = course.SelectByCourseName(courseName);
            return dt; 

        }
        public bool AddCourse(string courseID, string courseName, string credit)
        {
            bool b;
            CourseDOM addCourse = new CourseDOM();
            b = addCourse.InsertCourse(courseID, courseName, credit);
            return b;

        }
        public bool ModifyCourse(string courseID, string courseName, string credit)
        {   bool b=false;
            CourseDOM course = new CourseDOM();
            b = course.UpdateCourse(courseID, courseName, credit);
            return b;
        }
        public bool DeletCourse(string courseID)
        {
            bool b = false;
            CourseDOM course = new CourseDOM();
            b = course.DelCourse(courseID);
            return b;
        }
    }
}
